package com.xjoyt.pay.gateway.interfaces;

import java.util.List;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.xjoyt.pay.dto.AccessParam;
import com.xjoyt.pay.dto.ExecuteResult;
import com.xjoyt.pay.gateway.params.RateParam;
import com.xjoyt.pay.master.po.Merchant;
import com.xjoyt.pay.master.po.MerchantRate;

public interface MerchantContract {

	/**
	 * 通过商户号获取商户
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "get", method = RequestMethod.POST)
	ExecuteResult<Merchant> get(AccessParam<?> param);

	/**
	 * 通过商户号获取商户费率
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "getMerchantRate", method = RequestMethod.POST)
	ExecuteResult<List<MerchantRate>> getMerchantRate(AccessParam<?> param);

	/**
	 * 通过商户号获取商户
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "getByNo", method = RequestMethod.POST)
	ExecuteResult<Merchant> getByNo(AccessParam<String> param);

	/**
	 * 通过第三方商户号获取商户
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "getByCustomerNo", method = RequestMethod.POST)
	ExecuteResult<Merchant> getByCustomerNo(AccessParam<String> param);

	/**
	 * 商户注册(进件)
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "register", method = RequestMethod.POST)
	ExecuteResult<?> register(AccessParam<com.xjoyt.pay.merchant.register.po.Merchant> param);

	/**
	 * 修改商户
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "update", method = RequestMethod.POST)
	ExecuteResult<?> update(AccessParam<com.xjoyt.pay.merchant.register.po.Merchant> param);

	/**
	 * 重置密钥
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "resetKey", method = RequestMethod.POST)
	ExecuteResult<String> resetKey(AccessParam<String> param);

	/**
	 * 开通产品
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "open", method = RequestMethod.POST)
	ExecuteResult<?> open(AccessParam<RateParam> param);
}
